package onki.tests.pageObjects;

import java.util.ArrayList;
import java.util.List;
import org.openqa.selenium.support.*;
import org.openqa.selenium.*;

public class OnkiAlphabeticalPageObject {
  
  @FindBy(id = "alphabetical-search-results")
  private WebElement alphabeticalList;

  public ArrayList<String> getAlphabeticalList() {
    ArrayList<String> alphabeticalConceptLabels = new ArrayList();
    List<WebElement> concepts = alphabeticalList.findElements(By.xpath(".//a"));
    for (WebElement concept : concepts) {
      alphabeticalConceptLabels.add(concept.getText());
    }
    return alphabeticalConceptLabels;
  }
}
